<?php
$display_name = "";
$imagename = $url_base_media . "/assets/img/avatars/user.jpg";
if (trim($_user->fname()) != "") {
    $display_name = $_user->fname() . " " . $_user->lname();
} else {
    $display_name = $_user->getUsername();
}
if (trim($_user->getimagename()) != "") {
    $imagename = $url_base_media . "/" . Controller_Helper_Constant::FOLDER_AVATAR . "/" . $_user->getimagename();
}
?>
<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>
                    <img style="width: 160px;" src="<?= $url_base_theme . "/img/logo2.png" ?>" />
                </small>
            </a><!-- /.brand -->
        </div><!-- /.navbar-header -->
        <style>
            #navbar-container .navbar-header{
               /* background-color: #0089af;*/
            }
        </style>
        <div class="navbar-header pull-right" role="navigation" style="padding-top: 10px;">
            <ul class="nav ace-nav">

                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <img class="nav-user-photo" src="<?= $imagename ?>" alt="<?= $display_name ?>'s Photo" />
                        <span class="user-info">
                            <small>Welcome,</small>
                            <?= $display_name ?>
                        </span>

                        <i class="icon-caret-down"></i>
                    </a>

                    <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
                        <li>
                            <a href="<?= URL::base() . 'admin/user/profile' ?>">
                                <i class="icon-cog"></i>
                                Settings
                            </a>
                        </li>

                        <li class="divider"></li>

                        <li>
                            <a href="<?= URL::base() . 'admin/auth/login?logout=1' ?>">
                                <i class="icon-off"></i>
                                Logout
                            </a>
                        </li>
                    </ul>
                </li>
            </ul><!-- /.ace-nav -->
        </div><!-- /.navbar-header -->
    </div><!-- /.container -->
</div>

